Equatable

Ecng.Common

Provides a base implementation for objects that support equality, comparison, and cloning.

Hereda de: Cloneable<T>

Implementa: IEquatable<T>, IComparable<T>, IComparable

Métodos

CompareTo
public virtual int CompareTo(T value)
result = equatable.CompareTo(value)

Compares the current object with another object of the same type.

value
An object to compare with this object.

Devuelve: 0 if equal; -1 if not equal.

CompareTo
public int CompareTo(object value)
result = equatable.CompareTo(value)

Compares the current object with another object.

value
An object to compare with this object.

Devuelve: 0 if equal; -1 if not equal.

Equals
public virtual bool Equals(T other)
result = equatable.Equals(other)

Indicates whether the current object is equal to another object of the same type.

other
An object to compare with this object.

Devuelve: true if the current object is equal to the other parameter; otherwise, false.

Equals
public override bool Equals(object obj)
result = equatable.Equals(obj)

Determines whether the specified object is equal to the current object.

obj
The object to compare with this object.

Devuelve: true if the specified object is equal to the current object; otherwise, false.

GetHashCode
public override int GetHashCode()
result = equatable.GetHashCode()

Serves as the default hash function.

Devuelve: A hash code for the current object.

OnEquals
protected virtual bool OnEquals(T other)
result = equatable.OnEquals(other)

Determines equality between this instance and another instance of the same type.

other
An object to compare with this instance.

Devuelve: true if the objects are equal; otherwise, false.

op_Equality
public static bool op_Equality(Equatable<T> left, T right)
result = Equatable.op_Equality(left, right)

Determines whether an Equatable object and an object of type T are equal.

left
The Equatable object.
right
The object of type T.

Devuelve: true if the objects are equal; otherwise, false.

op_Equality
public static bool op_Equality(Equatable<T> left, Equatable<T> right)
result = Equatable.op_Equality(left, right)

Determines whether two Equatable objects are equal.

left
The left Equatable object.
right
The right Equatable object.

Devuelve: true if the objects are equal; otherwise, false.

op_Inequality
public static bool op_Inequality(Equatable<T> left, T right)
result = Equatable.op_Inequality(left, right)

Determines whether two Equatable objects are not equal.

left
The left Equatable object.
right
The right object of type T.

Devuelve: true if the objects are not equal; otherwise, false.

op_Inequality
public static bool op_Inequality(Equatable<T> left, Equatable<T> right)
result = Equatable.op_Inequality(left, right)

Determines whether two Equatable objects are not equal.

left
The left Equatable object.
right
The right Equatable object.

Devuelve: true if the objects are not equal; otherwise, false.